package com.huatai.datadevelop.mapper;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huatai.datadevelop.entity.ApiSubscreptionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;

/**
 * @author hecai
 * @description: TODO
 * @date 2023/2/15 14:34
 * @Version 1.0
 */
@Mapper
public interface ApiSubscreptionMapper extends BaseMapper<ApiSubscreptionEntity> {

    /**
     * 根据表名称获取表格数据
     * @param sqlStr
     * @param limitStr
     * @return
     */
    @Select(" select * from (${sqlStr}) as T ${limitStr}")
    List<JSONObject> getTableDataList(@Param("sqlStr") String sqlStr, @Param("limitStr") String limitStr);
}
